(set: $secret to (random: 1, 100))
(set: $turns to 0)
Hello and welcome to the number game! What you are about to play is a farily easy and simple game. I am thinking of a number between 1 and 100. It is your job to guess the number that I am thinking. Based on you guess I will tell you if your guess was too low, too high, or just right. You will win when you have correctly guessed my number! Shall we begin?
[[Make a guess.]]
(set: $guess to (num: (prompt: "What number do you guess?")))
(if: $guess < $secret)[(goto: "too low")]
(if: $guess > $secret)[(goto: "too high")]
(if: $guess is $secret)[(goto: "win")]
(set: $turns to it + 1)
Unfortunately your guess was too high.
[[Would you like to try again?|Make a guess.]]
Congratulations you smarty pants!
You have won the game and have guessed my number, (print: $secret) and in only (print: $turns) turns.
(set: $turns to it + 1)
Unfortunatly your guess was too low.
[[Would you like to try again?|Make a guess.]]
The Number Game
[[Let's go!|Intro]]